home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / gui / BGUI11B.lha / docs / listviewclass.doc < prev    next >
Text File  |  1994-12-06  |  30KB  |  760 lines

  1.  
  2.            $RCSfile: listviewclass.doc,v $
  3.         Description: Listviewclass documentation.
  4.           Copyright: (C) Copyright 1994 Jaba Development.
  5.                      (C) Copyright 1994 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8.             $Author: jaba $
  9.           $Revision: 1.8 $
  10.               $Date: 1994/11/15 14:26:26 $
  11. ------------------------------------------------------------------------------
  12.  
  13. TABLE OF CONTENTS
  14.  
  15. listviewclass/--background--
  16. listviewclass/Methods
  17. listviewclass/Attributes
  18.  
  19. listviewclass/--background--                      listviewclass/--background--
  20.  
  21.     NAME
  22.         Class:          listviewclass
  23.         Superclass:     baseclass
  24.         Include File:   <libraries/bgui.h>
  25.  
  26.     FUNCTION
  27.         To  provide   a  gadget  simular to the gadtools.library it's listview
  28.         kind.  The  lisview  class  does  how ever have extended functionality
  29.         like  hooks  for  entry  creation,  entry comparrison, entry and title
  30.         rendering.  Also  a  multi-selection mode is available. Opposed to the
  31.         gadtools  version  this  class does not require the usage  of list and
  32.         nodes.  All  kind  of  data  can  be  added to the listview as entries
  33.         providing that you supply hook routines to handle this data.
  34.  
  35.         Objects  from  this  class  send  out the following attribute pairs in
  36.         their notification events:
  37.  
  38.         GA_ID             - Gadget object ID.
  39.         LISTV_Entry       - Pointer to the selected entry.
  40.         LISTV_EntryNumber - Logical number of the selected entry.
  41.  
  42. listviewclass/Methods                                    listviewclass/Methods
  43.  
  44.     NOTE
  45.         Most  of  the  methods described below can also contain a pointer to a
  46.         GadgetInfo  structure.  This  pointer  does  not have to be valid. All
  47.         actions  will be done only if you want to let the action also be shown
  48.         visually  you  need to pass a valid pointer to a GadgetInfo structure.
  49.  
  50.     NEW METHODS
  51.         LVM_ADDENTRIES -- This  method  can be used to add more than one entry
  52.                 after  the  listview  object  has  been  created.  It uses the
  53.                 following custom message structure:
  54.  
  55.                 struct lvmAddEntries {
  56.                         ULONG              MethodID;  /* LVM_ADDENTRIES */
  57.                         struct GadgetInfo *lvmaGInfo; /* See note above. */
  58.                         APTR              *lvma_Entries;
  59.                         ULONG              lvma_How;
  60.                 };
  61.  
  62.                 lvma_Entries -- This  must point to a NULL-terminated array of
  63.                         pointers to the entries to add.
  64.  
  65.                 lvma_How -- Here  you  can select where the entries are added.
  66.                         The following positions are possible:
  67.  
  68.                         LVAP_HEAD -- The  entries  are added at the top of the
  69.                                 list.
  70.                         LVAP_TAIL -- The  entries  are  added at the bottom of
  71.                                 the list.
  72.                         LVAP_SORTED -- The entries  are added sorted according
  73.                                 to   the   sorting   method  active.   In  the
  74.                                 attributes  section  of this documentation you
  75.                                 can find more about the sorting possibilities.
  76.  
  77.                 This method returns TRUE uppon succes and FALSE if one or more
  78.                 of the entries failed to be added.
  79.  
  80.         LVM_ADDSINGLE -- This  method can be used to add a single entry to the
  81.                 listview  object  after  it  has  been  created.   It uses the
  82.                 following custom message structure:
  83.  
  84.                 struct lvmAddSingle {
  85.                         ULONG              MethodID;   /* LVM_ADDSINGLE */
  86.                         struct GadgetInfo *lvma_GInfo; /* See note above. */
  87.                         APTR               lvma_Entry;
  88.                         ULONG              lvma_How;
  89.                         ULONG              lvma_Flags;
  90.                 };
  91.  
  92.                 lvma_Entry -- This  must  point to the entry which needs to be
  93.                         added to the listview object.
  94.  
  95.                 lvma_How -- Please  refer  to  the  LVM_ADDENTRIES section for
  96.                         more information on the ways you can add entries.
  97.  
  98.                 lvma_Flags -- Any of the following flags can be set here:
  99.  
  100.                         LVASF_MAKEVISIBLE -- This tell's the lisview object to
  101.                                 scroll  the  list  to  make  the  added  entry
  102.                                 visible.
  103.                         LVASF_SELECT -- This  tell's  the  listview  object to
  104.                                 make the added entry selected. This  will also
  105.                                 automatically  scroll  the  list  to  make the
  106.                                 added entry visible.
  107.  
  108.                 Returns TRUE uppon success, FALSE uppon failure.
  109.  
  110.         LVM_CLEAR -- This  method must be used to clear and delete all entries
  111.                 present in the list.   It  uses  the  following custom message
  112.                 structure:
  113.  
  114.                 struct lvmCommand {
  115.                         ULONG              MethodID;   /* Several */
  116.                         struct GadgetInfo *lvmc_GInfo; /* See note above. */
  117.                 };
  118.  
  119.                 Return code is not defined.
  120.  
  121.         LVM_FIRSTENTRY, LVM_LASTENTRY, LVM_NEXTENTRY, LVM_PREVENTRY --   These
  122.                 methods must be used to itterate  through  all entries  in the
  123.                 listview.    All  these  methods  use  the  following  message
  124.                 structure:
  125.  
  126.                 struct lvmGetEntry {
  127.                         ULONG              MethodID;   /* Any of the above. */
  128.                         APTR               lvmg_Previous;
  129.                         ULONG              lvmg_Flags;
  130.                 };
  131.  
  132.                 lvmg_Previous -- For  the  LVM_FIRSTENTRY  and   LVM_LASTENTRY
  133.                         methods this must be NULL.   For the LVM_NEXTENTRY and
  134.                         LVM_PREVENTRY this should point to the  entry returned
  135.                         by a previous call to any of these methods.
  136.  
  137.                 lvmg_Flags -- Any of the following flags may be set here:
  138.  
  139.                         LVGEF_SELECTED -- The   methods  will  only  scan  for
  140.                                 selected entries when  this bit  is set.   All
  141.                                 non-selected entries will simply be skipped.
  142.  
  143.                 Returns a pointer  to  the  entry or NULL when no more entries
  144.                 are available.
  145.  
  146.                 Example:
  147.  
  148.                 /*
  149.                 **      Scan through all entries in
  150.                 **      the listview gadget starting
  151.                 **      at the first one.
  152.                 **/
  153.                 Object          *listview;
  154.                 APTR             entry;
  155.  
  156.                 /*
  157.                 **      Get first entry.
  158.                 **/
  159.                 if ( entry = (APTR)DoMethod(
  160.                                        listview, LVM_FIRSTENTRY, NULL, 0L )) {
  161.                         /*
  162.                         **      Loop through the rest of the list.
  163.                         **/
  164.                         do {
  165.                                 /*
  166.                                 **      Print the entry...
  167.                                 **/
  168.                                 printf( "Entry = %s\n", entry );
  169.                                 /*
  170.                                 **      Next entry...
  171.                                 **/
  172.                                 entry = (APTR)DoMethod(
  173.                                          listview, LVM_NEXTENTRY, entry, 0L );
  174.                         } while ( entry );
  175.                 }
  176.  
  177.         LVM_REMENTRY -- This method must be used to remove a single entry from
  178.                 the  listview  object.   It  uses the following custom message
  179.                 structure:
  180.  
  181.                 struct lvmRemEntry {
  182.                         ULONG              MethodID;   /* LVM_REMENTRY */
  183.                         struct GadgetInfo *lvmr_GInfo; /* See note above. */
  184.                         APTR               lvmr_Entry;
  185.                 };
  186.  
  187.                 lvmr_Entry -- This must point to the entry you want to remove.
  188.                         This usually is a pointer  returned  to you  by either
  189.                         the  LVM_FIRSTENTRY,  LVM_LASTENTRY,  LVM_NEXTENTRY or
  190.                         LVM_PREVENTRY method.
  191.  
  192.                 Return code is not defined.
  193.  
  194.         LVM_REFRESH -- This method must be used to refresh the listview object
  195.                 after some changes have been made which where not visible.  In
  196.                 some cases it might be usefull to add entries  without passing
  197.                 a GadgetInfo structure along  with the  adding  methods.  This
  198.                 will speed up the adding and you can show the changes when you
  199.                 are done by sending this method to the listview object.
  200.  
  201.                 This method uses the same custom message  structure as defined
  202.                 above at the LVM_CLEAR method.
  203.  
  204.                 Return code is not defined.
  205.  
  206.         LVM_SORT -- Calling  this  method  will force a complete re-sorting of
  207.                 the  entries  in  the  list.   This  can  be  handy  when your
  208.                 comparisson  hook (described  in the  Attributes  section) can
  209.                 handle different kinds of comparissons.
  210.  
  211.                 This method uses the same custom message  structure as defined
  212.                 above at the LVM_CLEAR method.
  213.  
  214.                 Return code is not defined.
  215.  
  216.         LVM_LOCKLIST, LVM_UNLOCKLIST --  These  methods  must  be used to lock
  217.                 or unlock the list contents.   When,  for  example,  you  must
  218.                 change the text of a list entry you should lock  it  using the
  219.                 LVM_LOCKLIST method and when you are done unlock it using  the
  220.                 LVM_UNLOCKLIST method.  This  locking is necessary  while  the
  221.                 list may get referenced while you are doing your changes.
  222.  
  223.                 Both  methods use the same custom message structure as defined
  224.                 above at the LVM_CLEAR method.
  225.  
  226.         LVM_MOVE ** V38 ** -- This  method must be used to move entries in the
  227.                 list. This method uses the following custom message structure:
  228.  
  229.                 struct lvmMove {
  230.                         ULONG              MethodID;       /* LVM_MOVE */
  231.                         struct GadgetInfo *lvmm_GInfo;     /* GadgetInfo */
  232.                         APTR               lvmm_Entry;
  233.                         ULONG              lvmm_Direction;
  234.                 };
  235.  
  236.                 lvmm_Entry -- This can point to the specific entry you want to
  237.                         move. If you specify NULL here the  selected  entry is
  238.                         moved.
  239.  
  240.                 lvmm_Direction -- Here you can specify the direction in  which
  241.                         the entry must be moved.  The following directions are
  242.                         possible:
  243.  
  244.                         LVMOVE_UP     -- Move the entry one place up.
  245.                         LVMOVE_DOWN   -- Move the entry one place down.
  246.                         LVMOVE_TOP    -- Move the entry to the list-top.
  247.                         LVMOVE_BOTTOM -- Move the entry to the list-bottom.
  248.  
  249.                 When the  entry  actually  moved the  class  will  send out  a
  250.                 notification message with the following attributes:
  251.  
  252.                         GA_ID             -- The ID of the object.
  253.                         LISTV_NewPosition -- The  new  numeric position of the
  254.                                 entry.
  255.  
  256.                 Returns TRUE when the entry moved and FALSE if not.
  257.  
  258.     CHANGED METHODS
  259.         None.
  260.  
  261. listviewclass/Attributes                              listviewclass/Attributes
  262.  
  263.     NAME
  264.         LISTV_ResourceHook -- ( struct Hook * )
  265.  
  266.     FUNCTION
  267.         To add a hook routine that will build or delete a listview entry.  The
  268.         hook routine will be called as follows:
  269.  
  270.         rc = hookFunc( hook, object, message );
  271.         D0             A0    A2      A1
  272.  
  273.         APTR             rc;
  274.         struct Hook     *hook;
  275.         Object          *object;
  276.         struct lvRender *message;
  277.  
  278.         The message arguments is a pointer to the following data structure:
  279.  
  280.         struct lvResource {
  281.                 UWORD           lvr_Command;
  282.                 APTR            lvr_Entry;
  283.         };
  284.  
  285.         lvr_Command -- This can be LVRC_MAKE which means that the  hook should
  286.                 create an entry or it can be  LVRC_KILL  which  means that the
  287.                 hook must dispose of a previously created entry.
  288.  
  289.         lvr_Entry -- When this is a LVRC_MAKE command  this contains  the data
  290.                 added  to  the  listview  by  one  of  the  adding  methods or
  291.                 attributes.  When  this  is a LVRC_KILL command this points to
  292.                 whatever LVRC_MAKE has created.
  293.  
  294.         The default creating/deletion that is done by the listview expects the
  295.         entries to be simple string pointers.   Internally these  strings  are
  296.         copied to an internal buffer when the entry is created. When the entry
  297.         is disposed of the string copy is simply  de-allocated.   If  you  add
  298.         entries to the listview which are not string pointers  you must supply
  299.         your own resource handling using this attribute.
  300.  
  301.         Example:
  302.  
  303.         /*
  304.         **      This example takes a PubScreenNode as input,
  305.         **      copies the name and adds that to the listview.
  306.         **      Uppon deletion it simply de-allocates the copy
  307.         **      of the string.
  308.         **/
  309.         __saveds __asm APTR
  310.         hookFunc( register __a0 struct Hook       *hook,
  311.                   register __a2 Object            *object,
  312.                   register __a1 struct lvResource *lvr )
  313.         {
  314.             struct PubScreenNode        *psn =
  315.                 ( struct PubScreenNode * )lvr->lvr_Entry;
  316.             UWORD                        len;
  317.             APTR                         rc = NULL;
  318.  
  319.             /*
  320.             **      Built or dispose?
  321.             **/
  322.             switch ( lvr->lvr_Command ) {
  323.                 case    LVRC_MAKE:
  324.                     /*
  325.                     **      Determine string size.
  326.                     **/
  327.                     len = strlen( psn->psn_Node.ln_name ) + 1;
  328.                     /*
  329.                     **      Allocate and copy the string.
  330.                     **/
  331.                     if ( rc = ( APTR )AllocVec( len, MEMF_ANY ))
  332.                         strcpy(( UBYTE * )rc, psn->psn_Node.ln_Name );
  333.                     break;
  334.  
  335.                 case    LVRC_KILL:
  336.                     /*
  337.                     **      Simply de-allocate whats created above.
  338.                     **/
  339.                     FreeVec( lvr->lvr_Entry );
  340.                     break;
  341.             }
  342.             /*
  343.             **      'rc' will be a pointer to the created
  344.             **      string copy or NULL which indicates a
  345.             **      memory error with LVRC_MAKE. If rc is non-NULL
  346.             **      the string is added to the list of entries.
  347.             **/
  348.             return( rc );
  349.         }
  350.  
  351.         The hook must return a pointer to the data created when the command is
  352.         LVRC_MAKE.  When  the  command  is  LVRC_MAKE and NULL is returned the
  353.         entry will not be added to the list.
  354.  
  355.         LVRC_KILL commands do not have a return code defined.
  356.  
  357.         Default is NULL (internal memory handling). Applicability is (I).
  358.  
  359.     SEE ALSO
  360.         LISTV_DisplayHook, LISTV_CompareHook
  361.  
  362.     NAME
  363.         LISTV_DisplayHook -- ( struct Hook * )
  364.  
  365.     FUNCTION
  366.         To add a hook routine that will take care of rendering the entries. In
  367.         some  cases  it  is  necessary  to do your own rendering. This hook is
  368.         called for each entry that needs to be rendered. The hook routine will
  369.         be called as follows:
  370.  
  371.         rc = hookFunc( hook, object, message );
  372.         D0             A0    A2      A1
  373.  
  374.         VOID             rc;     /* No return code defined. */
  375.         struct Hook     *hook;
  376.         Object          *object;
  377.         struct lvRender *message;
  378.  
  379.         The message argument is a pointer to the following data structure:
  380.  
  381.         struct lvRender {
  382.                 struct RastPort     *lvr_RPort;
  383.                 struct DrawInfo     *lvr_DrawInfo;
  384.                 struct Rectangle    *lvr_Bounds;
  385.                 APTR                 lvr_Entry;
  386.                 UWORD                lvr_State;
  387.                 UWORD                lvr_Flags;
  388.         };
  389.  
  390.         lvr_RPort -- This  is a pointer to the RastPort in which the rendering
  391.                 must be done. Please note that the font you must use to render
  392.                 text is already set up for you.  It  is  not  recommendable to
  393.                 use another font than the one set in this RastPort because the
  394.                 height of  the  area  you may render in is setup accoording to
  395.                 this font.
  396.  
  397.         lvr_DrawInfo -- This can point  to a  DrawInfo structure as defined in
  398.                 <intuition/screens.h> in which the necessay  information about
  399.                 the display environment is stored.  Note  that it  is possible
  400.                 that this is NULL. It is not very likely but it is possible.
  401.  
  402.         lvr_Bounds -- This is a struct Rectangle in  which the area you should
  403.                 render in is defined. Do _not_ render outside the given bounds
  404.                 or you will seriously screw up the display!  Also keep in mind
  405.                 that the area you are rendering into is not always cleared. In
  406.                 other words, the area may still show data from  another entry.
  407.                 You must make sure you completely re-render the given bounds.
  408.  
  409.         lvr_Entry -- This  points  to  the  entry  data  as setup by the entry
  410.                 creation hook or the built-in entry creation.
  411.  
  412.         lvr_State -- This  describes  the  state in which to render the entry.
  413.                 The state is one of the following possibilities:
  414.  
  415.                 LVRS_NORMAL -- Normal rendering. Render the entry in a normal,
  416.                         un-selected way.
  417.                 LVRS_SELECTED -- Selected rendering.  Render  the  entry  in a
  418.                         selected way.
  419.                 LVRS_NORMAL_DISABLED -- Normal, disabled rendering. Render the
  420.                         entry in a normal way but  make it  disabled.  This is
  421.                         normally  done  by  ghosting  it  with  a pattern (see
  422.                         below).
  423.                 LVRS_SELECTED_DISABLED -- Selected, disabled rendering. Render
  424.                         the entry is a selected way but make it disabled. This
  425.                         is normally done by ghosting  it with  a  pattern (see
  426.                         below).
  427.  
  428.                 Ghosting the entry is usually done like this:
  429.  
  430.                 struct lvRender         *lvr;
  431.                 UWORD                   *pens = lvr->lvr_DrawInfo->dri_Pens;
  432.                 UWORD                    patt = { 0x2222, 0x8888 };
  433.  
  434.                 SetAPen( lvr->lvr_RPort, pens[ SHADOWPEN ] );
  435.                 SetDrMd( lvr->lvr_RPort, JAM1 );
  436.                 SetAfPt( lvr->lvr_RPort, patt, 1 );
  437.  
  438.                 RectFill( lvr->lvr_RPort, lvr->lvr_Bounds.MinX,
  439.                                           lvr->lvr_Bounds.MinY,
  440.                                           lvr->lvr_Bounds.MaxX,
  441.                                           lvr->lvr_Bounds.MaxY );
  442.  
  443.                 Please keep in mind that, although the above code doesn't show
  444.                 it, the lvr_DrawInfo field can be NULL.
  445.  
  446.         lvr_Flags -- No flags are defined yet.
  447.  
  448.         When this hook is not set the internal rendering  routine will  simply
  449.         render a string which is created in  the  LIST_ResourceHook.  When the
  450.         LISTV_RenderHook routine creates something other than a  simple string
  451.         pointer you must provide a display hook to render the entries.
  452.  
  453.         Most  of  the  time  when  you  add  more  than a simple string to the
  454.         listview  object  the  data  you add is a structure which contains the
  455.         string  and  some  extra  data.  To prevent you from having to write a
  456.         display-hook  to  render the string your hook can also simply return a
  457.         pointer  to  the  string and the listviewclass will render it for you.
  458.         I.E.:
  459.  
  460.         struct myStruct {
  461.                 UBYTE           *string;
  462.                 UWORD            some_more_data;
  463.         };
  464.  
  465.         __saveds __asm hookFunc( register __a0 struct Hook     *hook,
  466.                                  register __a2 Object          *lv_obj,
  467.                                  register __a1 struct lvRender *lvr )
  468.         {
  469.              return((( struct myNode * )lvr->lvr_Entry )->string );
  470.         }
  471.  
  472.         This  hook  will  let the listviewclass dispatcher render the returned
  473.         string  for  you while keeping the extended data available for you. If
  474.         your  hook  returns  NULL  the listviewclass assumes you have done all
  475.         rendering required.
  476.  
  477.         Default is NULL (internal entry rendering). Applicability is (I).
  478.  
  479.     SEE ALSO
  480.         LISTV_ResourceHook, LISTV_CompareHook, LISTV_TitleHook
  481.  
  482.     NAME
  483.         LISTV_CompareHook -- ( struct Hook * )
  484.  
  485.     FUNCTION
  486.         To add a hook routine  that will  compare two  entries with eachother.
  487.         As it is possible  to have  entries  which are  different  from simple
  488.         strings you can perform your own comparison here.  The comparison hook
  489.         is called each time an entry is added  sorted or when  the list is re-
  490.         sorted. The hook routine will be called as follows:
  491.  
  492.         rc = hookFunc( hook, object, message );
  493.         D0             A0    A2      A1
  494.  
  495.         LONG                     rc;
  496.         struct Hook             *hook;
  497.         Object                  *object;
  498.         struct lvCompare        *message;
  499.  
  500.         The message argument is a pointer to the following data structure:
  501.  
  502.         struct lvCompare {
  503.                 APTR            lvc_EntryA;
  504.                 APTR            lvc_EntryB;
  505.         };
  506.  
  507.         lvc_EntryA, lvc_EntryB -- These  are the entries that must be compared
  508.                 to eachother.
  509.  
  510.         The internal comparison routine simple  does a  stricmp()  on the  two
  511.         entry strings.
  512.  
  513.         This hook must return -1 when entry a is smaller than entry b, 0  when
  514.         entry a is equal to entry b and 1 when entry a is bigger than entry b.
  515.  
  516.         Default is NULL (internal comparison routine). Applicability is (I).
  517.  
  518.     SEE ALSO
  519.         LISTV_ResourceHook, LISTV_DisplayHook
  520.  
  521.     NAME
  522.         LISTV_Top -- ( ULONG )
  523.  
  524.     FUNCTION
  525.         Set the top-entry of the visible part of the list. This tag is  mostly
  526.         used by the prop object that is connected to  the listview  but it can
  527.         also  be  controlled by your program. The data of this tag must be the
  528.         number of the node to set at the top of the visible area.
  529.  
  530.         Default is 0. Applicability is (ISGU).
  531.  
  532.     NAME
  533.         LISTV_ListFont -- ( struct TextAttr )
  534.  
  535.     FUNCTION
  536.         To set the font which is used to  render the  entries.  By default the
  537.         font  used  to  render  the  entries is the same font which is used to
  538.         render the object it's label. This font might be proportional. In some
  539.         cases  it might be useful to have a mono-space font for the entries or
  540.         even another proportional font.
  541.  
  542.         Default is NULL. Applicability is (IG)
  543.  
  544.     NAME
  545.         LISTV_ReadOnly -- ( BOOL )
  546.  
  547.     FUNCTION
  548.         To make the listview a read-only object.  Read only objects  have full
  549.         functionality except for the entries which cannot be selected.
  550.  
  551.         Default is FALSE. Applicability is (I).
  552.  
  553.     NAME
  554.         LISTV_MultiSelect -- ( BOOL )
  555.  
  556.     FUNCTION
  557.         To make the listview a multi-selection object. Multi-selection objects
  558.         allow the user to select more than one entry from the list.
  559.  
  560.         Default is FALSE. Applicability is (I).
  561.  
  562.     NAME
  563.         LISTV_EntryArray -- ( APTR * )
  564.  
  565.     FUNCTION
  566.         To add a set of entries at initialization time.  The data is a pointer
  567.         to a NULL-terminated array of entries which  need to  be added  to the
  568.         listview object.
  569.  
  570.         Default is NULL. Applicability is (I).
  571.  
  572.     SEE ALSO
  573.         LISTV_SortEntryArray
  574.  
  575.     NAME
  576.         LISTV_SortEntryArray -- ( BOOL )
  577.  
  578.     FUNCTION
  579.         To  sort  the  entries  added  at  object  create time. By default the
  580.         entries  added  with  the LISTV_EntryArray attribute will ocure in the
  581.         list in the same order as they ocure in the array. When this attribute
  582.         is set to TRUE these entries will be sorted.
  583.  
  584.         Default is FALSE. Applicability is (I).
  585.  
  586.     SEE ALSO
  587.         LISTV_EntryArray
  588.  
  589.     NAME
  590.         LISTV_Select -- ( ULONG )
  591.  
  592.     FUNCTION
  593.         To select an entry in the list. The entry you select will also be made
  594.         visible   in   the   display   area.  The data required is the logical
  595.         number of the entry in the list starting with 0 as the first entry.
  596.  
  597.         The following magic numbers are allowed in the tag it's data field:
  598.  
  599.         LISTV_Select_First    -- Select the first entry. ** V38 **
  600.  
  601.         LISTV_Select_Last     -- Select the last entry. ** V38 **
  602.  
  603.         LISTV_Select_Next     -- Select the next  entry.  If there is no entry
  604.                 selected yet the first visible entry is selected. ** V38 **
  605.  
  606.         LISTV_Select_Previous -- Select  the  previous entry.   If there is no
  607.                 selected  entry  yet  the  first  visible  entry  is selected.
  608.                 ** V38 **
  609.  
  610.         LISTV_Select_Top      -- Select the first visible entry. ** V38 **
  611.  
  612.         LISTV_Select_Page_Up  -- Select the entry one page above  the current.
  613.                 If the currently selected entry is not the  top-entry  the top
  614.                 entry will be selected. Otherwise the entry one-page up  minus
  615.                 one is selected. When no entry is selected the  first  visible
  616.                 entry is selected. ** V38 **
  617.  
  618.         LISTV_Select_Page_Down -- Select the entry one page below the current.
  619.                 If the currently selected entry is not the   bottom-entry  the
  620.                 bottom entry will be selected.  Otherwise  the  entry one-page
  621.                 down minus one is selected.  When  no  entry  is  selected the
  622.                 first visible entry is selected. ** V38 **
  623.  
  624.         Applicability is (SU).
  625.  
  626.     NAME
  627.         LISTV_MakeVisible -- ( ULONG )
  628.  
  629.     FUNCTION
  630.         To scroll the list to make the entry appear in the display area of the
  631.         listview object. The data required is the logical number of  the entry
  632.         in the list starting with 0 as the first entry.
  633.  
  634.         Applicability is (SU).
  635.  
  636.     NAME
  637.         LISTV_Entry -- ( APTR )
  638.  
  639.     FUNCTION
  640.         This  tag  is sent during notification. The data field is a pointer to
  641.         the entry which triggered the notification.
  642.  
  643.         Applicability is (N).
  644.  
  645.     SEE ALSO
  646.         LISTV_EntryNumber
  647.  
  648.     NAME
  649.         LISTV_EntryNumber -- ( ULONG )
  650.  
  651.     FUNCTION
  652.         This  tag  is  sent during notification. The data field is the logical
  653.         number of the entry which triggered the notification.
  654.  
  655.         Applicability is (N).
  656.  
  657.     SEE ALSO
  658.         LISTV_Entry
  659.  
  660.     NAME
  661.         LISTV_LastClicked -- ( APTR )
  662.  
  663.     FUNCTION
  664.         To get a pointer to the last selected entry.  This data can be used to
  665.         detect double-clicking and entry.
  666.  
  667.         Example:
  668.  
  669.         Object          *listview;
  670.         ULONG            ds[2], dm[2], last = 0, clicked;
  671.  
  672.         GetAttr( LISTV_LastClicked, listview, &clicked );
  673.         if ( clicked == last ) {
  674.                 CurrentTime( &ds[ 1 ], &dm[ 1 ] );
  675.                 if ( DoubleClick( ds[ 0 ], dm[ 0 ], ds[ 1 ], dm [ 1 ] )) {
  676.                         /* Double clicked */
  677.                         ...
  678.                 }
  679.         }
  680.         CurrentTime( &ds[ 0 ], &dm[ 0 ] );
  681.         last = clicked;
  682.  
  683.         Applicability is (G).
  684.  
  685.     SEE ALSO
  686.         LISTV_LastClickedNum
  687.  
  688.     NAME
  689.         LISTV_TitleHook -- ( struct Hook * )
  690.  
  691.     FUNCTION
  692.         To  add  a hook to render a title for the list. Multi-column listviews
  693.         normally  have  a  title  entry which is rendered in the list area but
  694.         does  not scroll with the list. To support multi-column listviews this
  695.         hook can be defined which will keep room for a single entry at the top
  696.         of the list area which is reserved for this purpose.  The hook routine
  697.         is  called  exactly the same as the LISTV_DisplayHook routine with the
  698.         exception  that  the  lvr_Entry  field  of the lvRender structure will
  699.         contain a NULL pointer.
  700.  
  701.         Default is NULL (no title). Applicability is (I).
  702.  
  703.     NAME
  704.         LISTV_ThinFrames -- ( BOOL )
  705.  
  706.     FUNCTION
  707.         To make  all  listview object framing appear as thin frames. This will
  708.         help you to make an aspect-ratio dependant GUI.
  709.  
  710.         Default is FALSE. Applicability is (I).
  711.  
  712.     NAME
  713.         PGA_NewLook -- ( BOOL )
  714.  
  715.     FUNCTION
  716.         To make the scroller of the listview gadget appear in the new look.
  717.  
  718.         Default is FALSE. Applicability is (I).
  719.  
  720.     NAME
  721.         LISTV_LastClickedNum -- ( ULONG ) ** V38 **
  722.  
  723.     FUNCTION
  724.         To return the number of the last selected entry.
  725.  
  726.         Applicability is (G).
  727.  
  728.     SEE ALSO
  729.         LISTV_LastClicked
  730.  
  731.     NAME
  732.         LISTV_NumEntries ( ULONG ) ** V38 **
  733.  
  734.     FUNCTION
  735.         To return the number of entries in the list.
  736.  
  737.         Applicability is (G).
  738.  
  739.     NAME
  740.         LISTV_NewPosition -- ( ULONG ) ** V38 **
  741.  
  742.     FUNCTION
  743.         To  notify  the  object  it's  targets  of the entry it's new position
  744.         number.   When  you  move an entry with the LVM_MOVE method the object
  745.         will send out a notification message with this attribute.
  746.  
  747.         Applicability is (N).
  748.  
  749.     SEE ALSO
  750.         LVM_MOVE
  751.  
  752.     NAME
  753.         LISTV_MinEntriesShown -- ( UWORD )
  754.  
  755.     FUNCTION
  756.         To specify how many entries should be visible at all times.  Note: The
  757.         larger this value the bigger the object it's minimum size.
  758.  
  759.         Default is 3. Applicability is (I).
  760.